/*
 * @Author: your name
 * @Date: 2020-10-11 16:48:51
 * @LastEditTime: 2020-10-11 17:17:23
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \Substation\vue.config.js
 */
const path = require('path');
const resolve = (dir) => {
  return path.join(__dirname, './', dir);
};
module.exports = {
  publicPath: './',
  // productionSourceMap: false,
  devServer: {
    proxy: {
      '/api': {
        // target:'http://yapi.data-bh.com/mock/132',
        // target:'http://yapi.data-bh.com/mock/168',
        target: 'http://10.193.23.78:18082', //济南测试库

        // target:'http://10.192.32.155:9090/',
        // target:'http://10.192.32.192:9090',
        // target:'http://10.193.23.78:18082/',
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/api': ''
        }
      },
      '/socket': {
        target: 'http://127.0.0.1:28880/taian/socket',
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/socket': ''
        }
      },
      '/yjjc': {
        target: 'http://10.193.23.21:28883',
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/yjjc': ''
        }
      },
      '/baseUrl': {
        // target:'http://10.192.33.53:8080/baseUrl',//rizhao
        target: 'http://10.192.33.53:28880/taian', //
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/baseUrl': ''
        }
      },
      '/isc': {//权限管理
        // target:'http://10.192.33.53:8080/baseUrl',//rizhao
        target: 'http://10.192.102.43:28884/isc/', //
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/isc': ''
        }
      },
      '/local': {//权限管理
        // target:'http://10.192.33.53:8080/baseUrl',//rizhao
        target: 'http://10.192.32.192:18002', //
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/local': ''
        }
      }
      
    },
    // host:'10.192.33.53'
  },
  configureWebpack: () => ({
    name: '',
    resolve: {
      alias: {
        '@': resolve('src'),
        '@assets': resolve('src/assets'),
        '@less': resolve('src/assets/less'),
        '@js': resolve('src/assets/js'),
        '@components': resolve('src/components'),
        '@mixins': resolve('src/mixins'),
        '@filters': resolve('src/filters'),
        '@store': resolve('src/store'),
        '@views': resolve('src/views'),

        // 文件别名
        'services': resolve('src/services'),
        'variable': resolve('src/assets/less/variable.less'),
        'mixins': resolve('node_modules/magicless/magicless.less')
      }
    }
  }),
}